package airport.server.service;

import airport.server.DAO.PanneauDAO;
import airport.shared.beans.PanneauBean;
import airport.shared.service.PanneauService;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

import java.util.ArrayList;

/**
 * Created by Romain on 05/03/15.
 */
public class PanneauServiceImpl extends RemoteServiceServlet implements PanneauService {

	@Override
	public ArrayList<PanneauBean> selectAll() {
		PanneauDAO pDAO = new PanneauDAO();

		return pDAO.selectAll();
	}

    @Override
    public PanneauBean selectAllByDate() {
        PanneauDAO pDAO = new PanneauDAO();

        return pDAO.selectAllByDate();
    }


    @Override
    public String save(PanneauBean panneau) {
        PanneauDAO pDAO = new PanneauDAO();
        return pDAO.save(panneau);
    }

	@Override
	public String update(PanneauBean panneau) {
		PanneauDAO pDAO = new PanneauDAO();

		return pDAO.update(panneau);
	}

	@Override
	public String delete(PanneauBean panneau) {
		PanneauDAO pDAO = new PanneauDAO();

		return pDAO.delete(panneau);
	}
}